<%--
  Created by IntelliJ IDEA.
  User: user
  Date: 2022/12/21
  Time: 9:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户信息管理</title>
    <%--    引入bootstrap的资源--%>
    <link rel="stylesheet" type="text/css"  href="bootstrap-3.3.6-dist/css/bootstrap.css"/>
<%--    引入bootstrap的js文件前要先引入jquery文件--%>
    <script src="jquery-1.12.4/jquery-1.12.4.js"></script>
    <script src="bootstrap-3.3.6-dist/js/bootstrap.js"></script>

</head>
<body style="margin: auto;padding-left:10px ">

<%--查询--%>
<div>
    <form action="getUserInfo">
        <button class="btn btn-primary">查询</button>
    </form>
</div>
<%--${sessionScope.get("userinfoes")}--%>
<div>
    <table class="table table-hover">
        <thead>
            <tr>
                <th>序号</th>
                <th>用户名</th>
                <th>密码</th>
                <th>地址</th>
                <th>联系方式</th>
                <th>用户头像</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <c:forEach items="${sessionScope.userinfoes}" var="eachBean" varStatus="stat">
                <tr>
                    <td>
                        ${stat.index+1}
                    </td>
                    <td>
                         ${eachBean.username}
                    </td>
                    <td>
                            ${eachBean.userpwd}
                    </td>
                    <td>
                            ${eachBean.useraddress}
                    </td>
                    <td>
                        ${eachBean.usertel}
                    </td>
                    <td>
                        <img src="${eachBean.imgsrc}" style="width: 200px;height: 200px">

                    </td>
                    <td>
                        <a href="getUserInfoById?id=${eachBean.id}" class="btn btn-primary">修改</a>
                        <a href="deleteUserInfoById?id=${eachBean.id}" class="btn btn-danger">删除</a>
                    </td>
                </tr>

            </c:forEach>

        </tbody>

    </table>
</div>





</body>
</html>
